<!--<link href="summernote/dist/summernote.css" rel="stylesheet"/>-->

<!-- 查看模态框 -->
<div class="modal fade" id="seeModal">
    <div class="modal-dialog" style="margin-top: 5%">
        <div class="modal-content">
            <div class="modal-header">
                <h6 class="modal-title" id="seeModalLabel">日记</h6>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
                <h6 id="diaryTitle2" style="text-align: center"></h6>
                <hr/>
                <span id="diaryText2"></span>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!-- 查看模态框 -->
<div class="modal fade" id="addDiaryModal">
    <div class="modal-dialog" style="margin-top: 5%">
        <div class="modal-content" style="width: 800px">
            <div class="modal-header">
                <h6 class="modal-title">日记</h6>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
                <form>
                    <input type="hidden" id="diaryId" name="diaryId">
                    <div class="form-group form-inline">
                        <label class="control-label" for="diaryTitle">日记标题</label>
                        <input type="text" class="form-control form-control-sm"
                               id="diaryTitle" name="diaryTitle" style="width: 50%;" autocomplete="off" />
                    </div>
                    <div class="form-group form-inline">
                        <label class="control-label" for="teacherId">审阅老师</label>
                        <select id="teacherId" name="teacherId" class="form-control" style="width: 50%">
                        </select>
                    </div>
                    <div class="form-group">
                        <textarea id="diaryText" name="diaryText" data-type="summernote"></textarea>
                    </div>
                    <div style="float: right">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-primary">提交日记</button>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!-- include summernote css/js -->
<!--<script src="summernote/dist/summernote.js"></script>-->
<!--<script src="summernote/dist/lang/summernote-zh-CN.js"></script>-->

<script>
    var token;
    $(function () {
        $('#diaryText').summernote({
            height:'400',
            focus: true,
            maxHeight: null,
            minHeight: null,
            toolbar: [
                // [groupName, [list of button]]
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['font', ['strikethrough', 'superscript', 'subscript']],
                ['fontsize', ['fontsize']],
                ['color', ['color']],
                ['para', ['ul', 'ol', 'paragraph']],
                ['height', ['height']]
            ]
        });
        token = sessionStorage.getItem('token')
    });
</script>